<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="{{ url_for('static',filename='css/font.css') }}">
    <link rel="stylesheet" href="{{ url_for('static',filename='css/style.css') }}">
    <link rel="stylesheet" href="{{ url_for('static',filename='css/theme.css') }}">
    <script type="text/javascript" src="{{ url_for('static',filename='js/jquery.min.js') }}"></script>
    <script src="{{ url_for('static',filename='lib/layui/layui.js') }}" charset="utf-8"></script>
    <script type="text/javascript" src="{{ url_for('static',filename='js/tl_cms.js') }}"></script>
</head>
<body style="background: #fff!important;">
<div>
    <div class="layui-col-md12">
        <div class="layui-card">
            <div class="layui-card-header">
                系统首页

                <a class="but_sm edit_pwd" title="修改密码" href="javascript:;"
                   onclick="tl_cms.open('修改密码','{{ url_for('sys_bp.member_edit') }}',600,400)">
                    修改密码</a>
                <a id="account_bind" class="but_sm edit_pwd">{% if current_user.user_rk %}
                    更换绑定
                {% else %}
                    账号绑定
                {% endif %}</a>
            </div>
            <div class="layui-card-body">
                <div class="layui-row">
                    <div class="layui-col-sm8">
                        <div class="layui-card layui-col-md6">
                            <div class="layui-card-header">数据统计</div>
                            <div class="layui-card-body layui-text">
                                <ul class="layui-row layui-col-space10 layui-this">
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>内容数据</h3>
                                            <p><cite>{{ data.count.doc }}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>分类数据</h3>
                                            <p><cite>{{ data.count.col }}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>广告数据</h3>
                                            <p><cite>{{ data.count.ad }}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>友情数据</h3>
                                            <p><cite>{{ data.count.link }}</cite></p>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="layui-card layui-col-md6">
                            <div class="layui-card-header">服务器信息</div>
                            <div class="layui-card-body layui-text">
                                <table class="layui-table">
                                    <colgroup>
                                        <col width="100">
                                        <col>
                                    </colgroup>
                                    <tbody>
                                    <tr>
                                        <td>系统版本</td>
                                        <td>
                                            {{ data.sys_os }}
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>内存信息</td>
                                        <td>
                                            总:{{ data.mem.total }} M/已:{{ data.mem.used }}M ({{ data.mem.use_per }}%)
                                            /可:{{ data.mem.free }}M
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>系统运行</td>
                                        <td>
                                            已运行 {{ data.sys_has_run }} 天
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="layui-card-body layui-text" style="padding: 4px 15px;margin-top: -18px;">
                                <table class="layui-table">
                                    <colgroup>
                                        <col width="100">
                                        <col>
                                    </colgroup>
                                    <tbody>
                                    <tr>
                                        <td>快捷操作</td>
                                        <td>
                                            <a href="{{ url_for('sys_bp.content_add') }}" target="content">发布内容</a> |
                                            <a href="{{ url_for('sys_bp.column_add') }}" target="content">添加分类</a> |
                                            <a href="{{ url_for('sys_bp.advertising') }}" target="content">添加广告</a>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-sm4">
                        <div class="layui-card">
                            <div class="layui-card-header">TL系统信息</div>
                            <div class="layui-card-body layui-text">
                                <table class="layui-table">
                                    <colgroup>
                                        <col width="100">
                                        <col>
                                    </colgroup>
                                    <tbody>
                                    <tr>
                                        <td>当前版本</td>
                                        <td>
                                            TL_CMS内容管理系统 v {{ data.version }}
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>基于框架</td>
                                        <td>
                                            Python + Flask
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>主要特点</td>
                                        <td>极简 / API数据发布 / 支持前后端分离 </td>
                                    </tr>
                                    <tr>
                                        <td>获取方式</td>
                                        <td style="padding-bottom: 0;">
                                            <div class="layui-btn-container">
                                                <a href=" http://wpa.qq.com/msgrd?v=3&uin=1368419640&site=qq&menu=yes"
                                                   target="_blank" class="layui-btn layui-btn-danger" style="background-color: #09C">联系作者</a>
                                                <a target="_blank" class="layui-btn" onclick="layer.msg('正在跳转...');setTimeout(function () {window.open('http://www.tlcms.net')}, 3000)">访问官网</a>
                                            </div>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md12">
                        <div class="layui-card">
                            <div class="layui-card-header" style="color: #09C">最新发布</div>
                            <div class="layui-card-body">
                                <table class="layui-table layui-form">
                                    <thead>
                                    <tr>
                                        <th>文档标题</th>
                                        <th>焦/轮/首/列/推/审核</th>
                                        <th>所属栏目</th>
                                        <th>阅读权限</th>
                                        <th>发布时间</th>
                                        <th>发布者</th>
                                        <th>点击数</th>
                                        <th>文档状态</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {% for data in data.doc_list %}
                                        <tr>
                                            <td style="color: {{ data.title_color }}">{{ data.title[:18] }}{% if data.title|length>18 %}...{% endif %}</td>
                                            <td>
                                                {{ data.is_focus|property|safe }}/
                                                {{ data.is_roll|property|safe }}/
                                                {{ data.is_index_stick|property|safe }}/
                                                {{ data.is_list_stick|property|safe }}/
                                                {{ data.is_recommend|property|safe }}/
                                                {{ data.status|property|safe }}
                                            </td>
                                            <td>{{ data.pro.column_name }}</td>
                                            <td>{{ data.permissions|is_pay }}</td>
                                            <td>{{ data.update_time }}</td>
                                            <td>{{ data.author }}</td>
                                            <td>{{ data.clicks }}</td>
                                            <td>{{ data.status|status }}</td>
                                            <td class="td-manage">
                                                <a href="{{ url_for('webapp_bp.article_page',uid=data.uuid) }}" class="layui-btn layui-btn-xs" style="background: none" target="_blank" title="前台演示"><i class="layui-icon layui-icon-website" style="color: #1E9FFF;font-size: 18px!important;"></i></a>
                                                <a class="but_sm" title="修改"
                                                   onclick="tl_cms.open('编辑','{{ url_for('sys_bp.content_edit',id=data.id) }}',0,0,true)"
                                                   href="javascript:;">修改</a>
                                                <a class="but_sm del_but" title="删除" onclick="del(this,'{{ data.id }}')"
                                                   href="javascript:;">
                                                    删除</a>
                                            </td>
                                        </tr>
                                    {% endfor %}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md12 copyright">
                        <div class="layui-card">
                            <div class="layui-card-header">版权声明</div>
                            <div class="layui-card-body">
                                <blockquote class="layui-elem-quote layui-quote-nm">
                                    1.购买授权后可自己提供建设网站，修改，二次开发的服务，但禁止发布或传播本程序及本程序的任何形态！禁止出售本程序及本程序的任何形态。说白了就是不能将程序出售或传播，否则侵权。<br>
                                    2. 不购买授权的将不能享受升级、安装、模板的权利，不得修改源代码,否则侵权。<br>
                                    3. 使用过程中若发现错误或漏洞(bug),请联系告知作者(QQ:1368419640) ---作者确认后将第一时间修复 。<br>
                                </blockquote>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<style>
    .layui-col-xs6 .layadmin-backlog-body {
        display: block;
        padding: 10px 15px;
        background-color: #f8f8f8;
        color: #999;
        border-radius: 2px;
        transition: all .3s;
        -webkit-transition: all .3s;
    }

    a:hover {
        text-decoration: none !important;
        cursor: pointer;
    }

    li {
        list-style: none;

    }

    .layui-text ul {
        padding: 5px 0 0 15px !important;
    }

    .layui-text ul li {
        margin-top: 3px !important;
    }

    .layadmin-backlog-body h3 {
        padding-bottom: 10px;
        font-size: 12px;
    }

    .layadmin-backlog-body p cite {
        font-style: normal;
        font-size: 30px;
        font-weight: 300;
        color: #009688;
    }

    .layadmin-backlog-body:hover {
        background-color: #f2f2f2;
        color: #888
    }

    .layadmin-shortcut li:hover .layui-icon {
        background-color: #f2f2f2
    }

    .layui-row > .layui-col-sm8 > div, .layui-row > .layui-col-sm4 > div {
        height: 244px !important;
    }

    .copyright {
    }
</style>
</body>
<script>
    $(function () {
        $('#account_bind').on('click', function () {
            layer.open({
                type: 2,
                title: '账号绑定',
                shadeClose: true,
                shade: 0.8,
                area: ['360px', '280px'],
                content: '{{ url_for("sys_bp.bind_account_html") }}'
            });
        })
    });
</script>
</html>